<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="../../css/weui.min.css">
    <link rel="stylesheet" href="../../css/weuix.css"/>
    <link rel="stylesheet" href="../../layui/css/layui.css"/>

    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/vue.js"></script>
    <script src="../../js/axios.min.js"></script>
    <script src="../../layui/layui.all.js"></script>


    <script src="../../js/f2.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
    <script src="https://unpkg.com/vue-chartjs/dist/vue-chartjs.min.js"></script>

    <script src="../../js/app.js"></script>
    <script>
        var uid = getUrlParam('uid');
    </script>
    <style>
        .weui-flex_box{
            margin-top: 20px;
        }
        h3{
            color: #ff851b;
            font-size: 1.5em;
        }
        .placeholder {
            margin: 5px;
            padding: 0 10px;
            background-color: #ebebeb;
            height: 4.3em;
            line-height: 4.3em;
            text-align: center;
            color: #ff851b;
            font-size: 1.5em;
        }

        .placeholder2 {
            margin: 5px;
            padding: 10px 10px;
            background-color: #ebebeb;
            text-align: center;
            font-size: 14px;
        }

        .placeholder3 {
            margin: 5px;
            padding: 10px 10px;
            background-color: #ebebeb;
            text-align: center;
            font-size: 14px;
        }
        .weui-form-preview{
            font-size: 15px;
        }

    </style>
</head>

<body>
<div ontouchstart id="app">
    <div class="weui-flex">
        <div class="weui-flex__item"><div class="placeholder">{{calllog.verify_name}}-通话记录</div></div>
    </div>

    <div class="weui-tab" id="t3" style="height:44px;">
        <div class="weui-navbar">
            <div class="weui-navbar__item"
                 onclick="location.href='report.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                综合报告
            </div>
            <div class="weui-navbar__item"
                 onclick="location.href='report_buer.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                多头报告
            </div>
            <div class="weui-navbar__item"
                 onclick="location.href='report_faude.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                反欺诈报告
            </div>
            <div class="weui-navbar__item"
                 onclick="location.href='report_carrier.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                运营商报告
            </div>
            <div class="weui-navbar__item"
                 onclick="location.href='report_contacts.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                手机通讯录
            </div>
            <div class="weui-navbar__item"
                 onclick="location.href='report_messages.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                手机短信
            </div>
            <div class="weui-navbar__item  tab-blue"
                 onclick="location.href='report_calllog.html?uid=' + uid + '&oid=' + oid + '&mobile=' + mobile + '&moxie=' + moxie + '&order_no=' + order_no + '&id_no=' + id_no + '&merchant=' + merchant">
                通话记录
            </div>
        </div>
    </div>

    <div class="weui-flex weui-flex_box">
        <div class="weui-flex__item">
            <div class="placeholder3">
                <h3 class="page-hd-title">
                    通话记录 -（{{calllog.count}}条）
                </h3>
                <table class="weui-table" >
                    <thead>
                    <tr>
                        <th>姓名</th>
                        <th>号码</th>
                        <th>时长</th>
                        <th>日期</th>
                    </tr>
                    </thead>
                    <tbody >
                    <tr v-for="item in calllog.list">
                        <td>{{item.name}}</td>
                        <td>{{item.phone}}</td>
                        <td>{{item.time}}秒</td>
                        <td>{{item.date}}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>

<script>
    var uid = getUrlParam('uid');
    var oid = getUrlParam('oid');
    var mobile = getUrlParam('mobile');
    var moxie = getUrlParam('moxie');
    var id_no = getUrlParam('id_no');
    var order_no = getUrlParam('order_no');
    var merchant = getUrlParam('merchant');
    var app = new Vue({
        el: '#app',
        data: {
            contacts:'',
            calllog:''
        },
        mounted: function () {
            this.messagesDataRreport();
        },
        methods: {
            messagesDataRreport: function () {
                var vm = this;
                layui.use('layer', function() {
                    var layer = layui.layer;
                    var index = layer.load(); //换了种风格
                    axios.post('/api/user/report/calllog', {
                        uid: uid,
                        oid: oid
                    }).then(function (response) {
                        var obj = response.data;
                        if (obj.code == 0) {
                            vm.calllog = obj.data;
                            layer.close(index);
                        } else {
                            layer.msg('暂无数据');
                            layer.close(index);
                        }
                    }).catch(function (response) {
                        console.log(response);
                    });
                })
            }
        }
    });
</script>

</body>
</html>
